<!DOCTYPE html>
<html style="height: 100%">
   <head>
       <meta charset="utf-8">
   </head>
   <body style="height: 100%; margin: 0">
       <div id="container" style="height: 100%"></div>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@4/dist/echarts.min.js"></script>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-gl@1/dist/echarts-gl.min.js"></script>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-stat@1/dist/ecStat.min.js"></script>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@4/dist/extension/dataTool.min.js"></script>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@4/map/js/china.js"></script>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@4/map/js/world.js"></script>
       <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts@4/dist/extension/bmap.min.js"></script>
       <script type="text/javascript">
var dom = document.getElementById("container");
var myChart = echarts.init(dom);
var app = {};
option = null;
option = {
    tooltip: {
        trigger: 'axis',
        axisPointer: {            // 坐标轴指示器，坐标轴触发有效
            type: 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
        },
        formatter: function (params, ticket, callback) {
            var lipStr = ""
            var totalNumber = 0;
            for (item in params) {
                totalNumber=totalNumber+params[item].value
           lipStr = lipStr+params[item].seriesName+":  "+params[item].value+"<br/>"
            }
            lipStr=params[0].name+":  "  +totalNumber+"<br/>"+  lipStr
         return lipStr;
}
    },
    legend: {
        data: ['A', 'B', 'C']
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis: {
        type: 'value',
		 splitLine: {
          show: false
        }
    },
    yAxis: {
        type: 'category',
        data: ['蒙东', '蒙西', '河南', '山东', '重庆', '西安', '河北','安徽','江苏']
    },
    series: [
        {
            name: 'A',
            type: 'bar',
            stack: '总量',
			barWidth : 30,
            label: {
                show: true,
                position: 'insideRight'
            },
            data: [320, 302, 301, 334, 390, 330, 320,300,311]
        },
        {
            name: 'B',
            type: 'bar',
            stack: '总量',
			barWidth : 30,
            label: {
                show: true,
                position: 'insideRight'
            },
            data: [120, 132, 101, 134, 90, 230, 210,231,198]
        },
        {
            name: 'C',
            type: 'bar',
            stack: '总量',
			barWidth : 30,
            label: {
                show: true,
                position: 'insideRight'
            },
            data: [220, 182, 191, 234, 290, 330, 310,298,231]
        }
    ]
};;
if (option && typeof option === "object") {
    myChart.setOption(option, true);
}
       </script>
   </body>
</html>